package com.k7.mobile.platform.web.action;

import java.util.List;

import com.k7.mobile.platform.bo.IGramBO;
import com.k7.mobile.platform.bo.ITypeBO;
import com.k7.mobile.platform.dataobject.GramDO;
import com.k7.mobile.platform.dataobject.RecommendxDO;
import com.k7.mobile.platform.dataobject.TypeDO;
import com.k7.mobile.platform.web.support.Constants;

/**
 * 首页
 * @author ouwa_bb
 *
 */
public class IndexAction extends BaseAction{	
	private static final long serialVersionUID = -5048373149842002950L;
	private IGramBO gramBO;
	private ITypeBO typeBO;
	private List<GramDO> list;
	private List<TypeDO> typeList;

	@Override
	public String execute() throws Exception {
		RecommendxDO recommendDO = new RecommendxDO();
		recommendDO.setToPage(1);
		recommendDO.setParentId(1);
		list = gramBO.findRecommendGameList(recommendDO);
		TypeDO typeDO = new TypeDO();
		typeDO.setParent(Constants.DEFAULT_ROOT_PARENT);
		typeList = typeBO.findList(typeDO);
		return SUCCESS;
	}

	public void setGramBO(IGramBO gramBO) {
		this.gramBO = gramBO;
	}

	public List<GramDO> getList() {
		return list;
	}

	public void setTypeBO(ITypeBO typeBO) {
		this.typeBO = typeBO;
	}

	public List<TypeDO> getTypeList() {
		return typeList;
	}

	public void setTypeList(List<TypeDO> typeList) {
		this.typeList = typeList;
	}
	
}
